function diff = emp_drift( m, param)

    % drift in employment as a function of m (caped at drift_max)

    diff =(eta_fun(m,param)-param.zeta-delta_fun(m,param));
    if min(m)<param.m_l
        diff((m<param.m_l)) =  ones(size(m(m<param.m_l))).*(-param.drift_max);
    end  
    if max(m)>=param.m_max
        diff((m>=param.m_max)) = ones(size(m(m>=param.m_max))).*param.drift_max;
    end

    if param.K>0
        ind = (m>=param.m_h).*(m<=param.m_e);
        if max(ind)>0
            diff((ind==1)) = 0;
        end
    end
end

